﻿using System.Xml.Linq;

namespace TKT.Lifter.CIM.Lifter.TibcoMsg.Mes
{
    public class SubjectReportReply : MessageBody
    {
        public string MachineName { get; set; }

        public string SubjectName { get; set; }

        public string Acknowledge { get; set; }

        public SubjectReportReply()
            : base("SubjectReportReply")
        {

        }

        public override XElement ToXElement()
        {
            XElement body = new XElement("Body");
            body.Add(new XElement("MACHINENAME", this.MachineName));
            body.Add(new XElement("SUBJECTNAME", this.SubjectName));
            body.Add(new XElement("ACKNOWLEDGE", this.Acknowledge));
            return body;
        }

        public override void Parse(XElement body)
        {
            this.MachineName = body.Element("MACHINENAME").Value;
            this.SubjectName = body.Element("SUBJECTNAME").Value;
            this.Acknowledge = body.Element("ACKNOWLEDGE").Value;
        }
    }
}
